From 9f048aa91c66b9e0d29d932a7b2777dc0714252d Mon Sep 17 00:00:00 2001 From: "adsharma@los-vmm.sc.intel.com" Date: Tue, 9 Aug 2005 11:06:44 -0800 Subject: [PATCH] Fix Mouse hang with VNC I've made some progress on this problem. Turns out, the VNC emulator is a little over aggressive in dealing with reset commands for the mouse. Since there are commands that enable and disable the mouse the VNC emulator provides this control. Unfortunately, VNC also interprets either a `reset' or `set to default' command to also disable the mouse. This is wrong, neither of these commands are supposed to affect the enabled status of the mouse so that, when X sends a `reset', no futher mouse data is sent, making it look like X is hung. Signed-off-by: Don Dugger Signed-off-by: Arun Sharma --- tools/ioemu/hw/pckbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ioemu/hw/pckbd.c b/tools/ioemu/hw/pckbd.c index 85863b433f..b367fa6783 100644 --- a/tools/ioemu/hw/pckbd.c +++ b/tools/ioemu/hw/pckbd.c @@ -704,14 +704,14 @@ int spare; case AUX_SET_DEFAULT: s->mouse_sample_rate = 100; s->mouse_resolution = 2; - s->mouse_status = 0; + s->mouse_status &= MOUSE_STATUS_ENABLED; s->touchpad.absolute = 0; kbd_queue(s, AUX_ACK, 1); break; case AUX_RESET: s->mouse_sample_rate = 100; s->mouse_resolution = 2; - s->mouse_status = 0; + s->mouse_status &= MOUSE_STATUS_ENABLED; s->touchpad.absolute = 0; kbd_queue(s, AUX_ACK, 1); kbd_queue(s, 0xaa, 1); -- 2.30.2